<template>
	<view class="page">
		<block v-if="IsDanYe == 0">
		    <view  bindtap='tel' class='tel'>联系电话
		    <view class="phone">{{ phone }}</view>
		    </view>
		
		    <view class='qq'>
		    <text>QQ</text>
		    <text selectable='true' >{{ qq }}</text>
		    </view>
		    <view class='qq'>
		    <text>微信</text>
		    <text selectable='true' >{{ weiXin }}</text>
		    </view>
		</block>
		<block v-else>
		<rich-text :nodes="content"></rich-text>
		</block>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				IsDanYe:0,
				phone:'',
				qq:'',
				weiXin:'',
				content:'',
			}
		},
		onLoad() {
			this.getCustomerService()
		},
		methods: {
			getCustomerService(){
				this.$api.getCustomerService().then(res => {
					this.IsDanYe = res.data.IsDanYe
					this.phone = res.data.Phone
					this.qq = res.data.QQ
					this.weiXin = res.data.WeiXin
					this.content = res.data.Content
				})
			}
		}
	}
</script>

<style scoped>
@import url('customerService.css');
</style>
